#!/usr/bin/env python3
# _*_ coding:utf-8 _*_
#Author: Tian Yin Fan

import time


def timer(func):
    def recoder(*args, **kwargs):
        start = time.time()
        func(*args, **kwargs)
        end = time.time()
        spent_time = end - start
        print "Used time: ", int(spent_time)
    return recoder


@timer
def run():
    time.sleep(3)
    print("finished")

run()
